namespace EFS.Common.Config
{
	public static class Deployment
	{
		private static System.Boolean loaded = false;

		#region LoadConfiguration
		private static void Load()
		{
			// load
			LoadClientConfig();

			// loaded
			loaded = true;
		}

		/// <summary>
		/// load config from machine.config
		/// </summary>
		private static void LoadClientConfig()
		{
			// read section LoadDatabases
			EFS.Common.Config.Reader conf = new EFS.Common.Config.Reader("EFS/Deployment");

			// check
			if (null == conf)
			{
				throw new System.Exception("conf EFS/Deployment");
			}

			// set			
			installation = conf.GetAttributeString("installation").ToLower();
		}

		#endregion

		#region Properties

		private static System.String installation = "";
		public static System.String Installation
		{
			get
			{
				if (!loaded) { Load(); }
				return installation;
			}
		}

		#endregion
	}
}